//
//  SecurityCell.m
//  TenThousand
//
//  Created by baixue on 16/7/31.
//  Copyright © 2016年 baixue. All rights reserved.
//

#import "SecurityCell.h"

@implementation SecurityCell

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

- (void)cellAutoLayoutHeight:(NSString *)str {
    self.detail.lineBreakMode = NSLineBreakByWordWrapping;
    self.detail.preferredMaxLayoutWidth = CGRectGetWidth(self.detail.frame);
    NSMutableAttributedString * attributedString1 = [[NSMutableAttributedString alloc] initWithString:[NSString stringWithFormat:@"%@", str]];
    NSMutableParagraphStyle * paragraphStyle1 = [[NSMutableParagraphStyle alloc] init];
    [paragraphStyle1 setLineSpacing:8];
    [attributedString1 addAttribute:NSParagraphStyleAttributeName value:paragraphStyle1 range:NSMakeRange(0, [str length])];
    [self.detail setAttributedText:attributedString1];
}

@end
